import api from './index'

// 学生相关API
export const studentAPI = {
  // 获取学生信息
  getStudentInfo: () => {
    return api.get('/student/info')
  },

  // 更新学生信息
  updateStudentInfo: (data) => {
    return api.put('/student/info', data)
  },

  // 提交紧急联系人信息
  submitEmergencyContact: (data) => {
    return api.post('/student/emergency-contact', data)
  },

  // 获取报到状态
  getRegistrationStatus: () => {
    return api.get('/student/registration-status')
  },

  // 获取缴费信息
  getPaymentInfo: () => {
    return api.get('/student/payment-info')
  },

  // 在线缴费
  makePayment: (data) => {
    return api.post('/student/payment', data)
  },

  // 获取缴费记录
  getPaymentHistory: () => {
    return api.get('/student/payment-history')
  },

  // 获取班级信息
  getClassInfo: () => {
    return api.get('/student/class-info')
  },

  // 获取宿舍信息
  getDormitoryInfo: () => {
    return api.get('/student/dormitory-info')
  },

  // 获取通知公告
  getNotices: (params) => {
    return api.get('/student/notices', { params })
  },

  // 获取通知详情
  getNoticeDetail: (id) => {
    return api.get(`/student/notices/${id}`)
  },

  // 获取日程安排
  getSchedule: () => {
    return api.get('/student/schedule')
  },

  // 获取联系方式
  getContactInfo: () => {
    return api.get('/student/contact-info')
  }
}